package com.ruoyi.quality.domain.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 质量通报业务对象 quality_physical_report
 *
 * @author ruoyi
 * @date 2023-07-31
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class QualityPhysicalReportBo extends BaseEntity {

    /**
     * 通报id
     */
    @NotNull(message = "通报id不能为空", groups = { EditGroup.class })
    private Long reportId;

    /**
     * 编号
     */
    @NotBlank(message = "编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String reportNumber;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String reportName;

    /**
     * 摘要
     */
    private String reportAbstract;

    /**
     * 部门
     */
    @NotBlank(message = "部门不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deptAbbreviation;

    /**
     * 日期
     */
    @NotNull(message = "日期不能为空", groups = { AddGroup.class, EditGroup.class })
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date reportDate;

    /**
     * 措施
     */
    @NotBlank(message = "措施不能为空", groups = { AddGroup.class, EditGroup.class })
    private String reportMeasure;

    /**
     * 问题列表
     */
    private List<QualityPhysicalDefectBo> defectList;
}
